<?php
	require_once('../includes/config.php');
	$action = $_REQUEST['act'];
	$cmnid = $_POST['id'];
	$content = $_POST['content'];

	if($action == "edit")
	{
		mysql_query("UPDATE tbl_comment SET comment_content = '$content' WHERE id = '$cmnid'") or die("can not update");
		echo 1;
		exit;
	}
	elseif($_GET['act'] == "del")
	{
		$id = $_REQUEST['id'];
		mysql_query("DELETE FROM tbl_comment WHERE id = '$id'");
		echo 1;
		exit;
	}


?>